package service.impl;
import dao.impl.GoodsDaoImpl;
import entity.Goods;
import service.IGoodsService;

public class GoodsServiceImpl implements IGoodsService{
	GoodsDaoImpl gdi = new GoodsDaoImpl();
	@Override
	public boolean save(Goods goods) {
		return gdi.save(goods);
	}

	@Override
	public boolean sale(String name) {
		return gdi.sale(name);
	}

	@Override
	public boolean updateById(Goods goods, int id) {
		return gdi.updateById(goods, id);
	}

	@Override
	public Goods[] selectAll() {
		return gdi.selectAll();
	}

	@Override
	public Goods selectById(int id) {
		return gdi.selectById(id);
	}

	@Override
	public Goods selectByName(String name) {
		return gdi.selectByName(name);
	}

	@Override
	public Goods[] selectByPrice(double lowPrice, double highPrice) {
		return gdi.selectByPrice(lowPrice, highPrice);
	}

	@Override
	public Goods[] selectAllSoldOutGoods() {
		return gdi.selectAllSoldOutGoods();
	}

	@Override
	public Goods[] desByGoodsCount() {
		return gdi.desByGoodsCount();
	}
	
}
